package com.wva.captcha.domain.dto;

import com.wva.common.constant.PatternConst;
import com.wva.common.domain.Payloads;
import com.wva.common.domain.dto.PictureCaptchaVerifyDTO;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author: hong
 * @Date: 2025/1/21 23:23:25
 */
@Data
public class GetSmsCaptchaDTO {
    @NotEmpty(message = "请输入手机号")
    @Pattern(regexp = PatternConst.PHONE, message = "手机号格式不正确")
    private String phone;

    /**
     * 获取短信验证码前必须先校验图形验证码
     */
    @NotNull(payload = Payloads.RequirePictureCaptcha.class)
    @Valid
    PictureCaptchaVerifyDTO pictureVerify;
}
